#--------------------------------------------------------------------------------#
# Copyright (c) 2021, under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
# For more information see: http://creativecommons.org/licenses/by-nc-sa/3.0/us/
# All rights reserved. 
#--------------------------------------------------------------------------------#

#--------------------------------------------------------------------------------#
# install R and necessary packages
#--------------------------------------------------------------------------------#

Below provides information of the versions R and Mac OS-X that the programs were run as well as R packages necessary to reproduce the results:

sessionInfo():

R version 4.2.2 (2022-10-31)Platform: aarch64-apple-darwin20 (64-bit)Running under: macOS Monterey 12.5Matrix products: defaultLAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dyliblocale:[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8attached base packages:[1] grid      stats     graphics  grDevices utils     datasets  methods   base     other attached packages: [1] stargazer_5.2.3  bandit_0.5.1     reshape2_1.4.4   ri2_0.4.0        [5] randomizr_0.22.0 ggpubr_0.6.0     ggridges_0.5.4   gridExtra_2.3    [9] ggrepel_0.9.3    texreg_1.38.6    estimatr_1.0.0   lubridate_1.9.2 [13] forcats_1.0.0    stringr_1.5.0    dplyr_1.1.2      purrr_1.0.1     [17] readr_2.1.4      tidyr_1.3.0      tibble_3.2.1     ggplot2_3.4.2   [21] tidyverse_2.0.0 loaded via a namespace (and not attached): [1] tidyselect_1.2.0   splines_4.2.2      lattice_0.20-45    carData_3.0-5      [5] colorspace_2.1-0   vctrs_0.6.3        generics_0.1.3     utf8_1.2.3         [9] rlang_1.1.1        pillar_1.9.0       glue_1.6.2         withr_2.5.0       [13] foreach_1.5.2      emmeans_1.8.2      lifecycle_1.0.3    plyr_1.8.8        [17] munsell_0.5.0      ggsignif_0.6.4     gtable_0.3.3       mvtnorm_1.1-3     [21] codetools_0.2-18   coda_0.19-4        tzdb_0.4.0         fansi_1.0.4       [25] broom_1.0.5        Rcpp_1.0.10        xtable_1.8-4       scales_1.2.1      [29] backports_1.4.1    abind_1.4-5        hms_1.1.3          stringi_1.7.12    [33] gam_1.22           rstatix_0.7.2      cli_3.6.1          tools_4.2.2       [37] magrittr_2.0.3     Formula_1.2-5      car_3.1-1          pkgconfig_2.0.3   [41] estimability_1.4.1 timechange_0.2.0   iterators_1.0.14   httr_1.4.6        [45] rstudioapi_0.15.0  boot_1.3-28        R6_2.5.1           compiler_4.2.2   



## -------------------------------------------------- #
# file folder descriptions
## -------------------------------------------------- #

* Data
 - data.rdata		Contains RCV survey responses ('data') as well as posterior probability matrix from Thompson sampling ('pmat').

* Programs
 - fn.R:  		Helper functions to run analyses.
 - Figure 1.R:		Reproduces Figure 1 in main manuscript.
 - Table 2.R:		Reproduces Table 2 simulation result in main manuscript.
 - Appendix E-G.R:	Reproduces Figures in Online Appendix Sections E through G.
 - Appendix I1.R:	Reproduces Table A2 simulation result in Online Appendix Section I.1.
 - Appendix I2.R: 	Reproduces Table A3 simulation result in Online Appendix Section I.2.
 - Appendix I3.R: 	Reproduces Table A4 simulation result in Online Appendix Section I.3.
 - Appendix I4.R: 	Reproduces Table A5 simulation result in Online Appendix Section I.4.

* Outputs
 - \Output:   This folder contains simulation results in data. 
	- T2_simulation.rdata:	Simulation result used in Table 2 in main manuscript.
	- TF1_simulation.rdata: Simulation result used in Table A2 in Online Appendix Section I.1.
	- TF2_simulation.rdata: Simulation result used in Table A3 in Online Appendix Section I.2.
	- TF3_simulation.rdata: Simulation result used in Table A4 in Online Appendix Section I.3.
	- TF4_simulation.rdata: Simulation result used in Table A5 in Online Appendix Section I.4.
 - \Figures:  This folder contains figures included in the main manuscript and online appendix.

